package org.dromara.datacheck.controller;

import cn.dev33.satoken.annotation.SaCheckPermission;
import lombok.RequiredArgsConstructor;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.datacheck.domain.bo.JstAndJDTableDataEntryBo;
import org.dromara.datacheck.service.IDomesticBusinessCollectService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.text.ParseException;

/**
 * @Author 刘武贵
 * @Date 2024/11/12 11:46
 * @Description 功能描述：国内业务汇总统计
 */
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/dataCheck/domestic-business-collect")
public class DomesticBusinessCollectController {

    private final IDomesticBusinessCollectService domesticBusinessCollectService;


    /**
     * 查询国内业务汇总统计（聚水潭和金蝶）
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:list")
    @GetMapping("/sum/{monthString}")
    public TableDataInfo<JstAndJDTableDataEntryBo> jstAndJdSum(@PathVariable String monthString) throws ParseException {
        return domesticBusinessCollectService.jstAndJdSum(monthString);
    }
}
